from django.db import models
from utils.BaseModel import BaseModel


# Create your models here.


class Nav(BaseModel):
    navname = models.CharField(max_length=20, verbose_name="导航服务")
    position = models.IntegerField(default=0, verbose_name="导航位置")

    class Meta:
        db_table = 'fgnav'

    def __str__(self):
        return self.navname


class Banner(BaseModel):
    title = models.CharField(max_length=20, verbose_name='轮播标题')
    img = models.CharField(max_length=200, verbose_name='轮播图片')
    url = models.CharField(max_length=200, verbose_name='轮播链接')

    class Meta:
        db_table = 'fgbranner'

    def __str__(self):
        return self.title
